<&include file="include/header.tpl" title=$title username=$user_firstname web_site=$web_site page_css="find-goals.css"&>
<!--page_text-->
	<div id="main">

<!--side--> 
<!--       
        <div id="left-side">
        	<div class="box1">
            	<p>Change city</p>
                <div class="sel" style="z-index:10" id="search_area_block"><input type="text" id="search_area_name" value="<&if $arrArgs.area&><&$objConfigModel->getArea($arrArgs.area)&><&else&>All<&/if&>" class="text-box245" readonly="readonly" style="cursor:default"/><a href="#" class="next-sel" id="search_area_list_ctrl"></a><ul class="text-box245 sel-lists-box" style="display:none" id="search_area_list"><&foreach item=area from=$area_list name=area_list&><li id="<&$area.id&>"><&$area.area_name&></li><&/foreach&></ul></div>
                <a href="#pop6" class="show_pop6"><span>(Not see your city?)</span></a>
                <p>Choose fitness goals</p>
                <div class="sel" style="z-index:5" id="gen_goal_block"><input type="text" id="gen_goal_name" value="<&if $arrArgs.goal&><&$objConfigModel->getGenGoal($arrArgs.goal)&><&else&>All<&/if&>" class="text-box245" readonly="readonly" style="cursor:default"/><a href="#" class="next-sel" id="gen_goal_list_ctrl"></a><ul class="text-box245 sel-lists-box" style="display:none" id="gen_goal_list"><&foreach item=gen_goal from=$gen_goal_all_list name=gen_goal_all_list&><li id="<&$gen_goal.id&>"><&$gen_goal.goal_name&></li><&/foreach&></ul></div>
            </div>
            
            <div class="box2">
            	<div class="title">Browse goals</div>
                <strong>Gender</strong>
                <ul>
                <&foreach item=gender from=$gender_list name=gender_list&>
                	<li><a href="<&$gender.url&>" <&if $gender.selected&> class="now" <&/if&>><&$gender.gender_name&></a></li>                   
                <&/foreach&>
                </ul>
                <strong>Age group</strong>
                <ul>
                <&foreach item=age from=$age_list name=age_list&>
                	<li><a href="<&$age.url&>" <&if $age.selected&> class="now" <&/if&>><&$age.age_name&></a></li>                   
                <&/foreach&>

                </ul>
                <strong>Body type</strong>
                <ul>
                <&foreach item=body from=$body_list name=body_list&>
                	<li><a href="<&$body.url&>" <&if $body.selected&> class="now" <&/if&>><&$body.body_name&></a></li>                   
                <&/foreach&>
                </ul>
                <strong>Who are clients looking for</strong>
                <ul>
                <&foreach item=trainer from=$trainer_list name=trainer_list&>
                	<li><a href="<&$trainer.url&>" <&if $trainer.selected&> class="now" <&/if&>><&$trainer.trainer_name&></a></li>                   
                <&/foreach&>
                </ul>
            
                <strong>Hiring trainers?</strong>
                <ul>
                <&foreach item=status from=$status_list name=status_list&>
                	<li><a href="<&$status.url&>" <&if $status.selected&> class="now" <&/if&>><&$status.status_name&></a></li>                   
                <&/foreach&>

                </ul>
            
            </div>
        </div>
-->
<!--side_over-->        
        <div id="right-body">
			<div class="box6">
            	<h1><&$goal_cnt&> fitness goals found</h1>
<!--                
                <div class="sort"><span>Sort by</span>
                <&foreach item=sort from=$sort_list name=sort_list&>
                <a href="<&$sort.url&>" <&if $sort.selected&> class="now" <&/if&>><&$sort.sort_name&></a>                  
                <&/foreach&>
        
                </div>
-->
            <div class="find-p"><a href="/user/ranking">Leader board</a><a href="/goal/search">Find all</a><a href="#nogo" id="people_like_me">Find people like me :) </a></div>
            </div>
 			<table cellpadding="0" cellspacing="0" border="0" class="find-lists">
            	<tr>
                <&foreach item=sort from=$sort_list name=sort_list&>
                <&if $sort.sort_name == "Goal name"&>
                <th colspan="2"><&$sort.sort_name&></th>
                <&elseif $sort.sort_name == "Status"&>
                    <th><&$sort.sort_name&></th>
                <&else&>
                    <&if $sort.selected&>
                        <&if  $arrArgs.asc == 0&>
                            <th><a href="<&$sort.url&>asc/1"><&$sort.sort_name&><span class="px">▼</span></a></th>
                        <&else&>
                            <th><a href="<&$sort.url&>"><&$sort.sort_name&><span class="px">▲</span></a></th>
                        <&/if&>
                    <&else&>
                        <th><a href="<&$sort.url&>"><&$sort.sort_name&></a></th>
                    <&/if&>
                <&/if&>
                <&/foreach&>
                </tr>
                
                
                <!--goal_list-->
                <&foreach item=goal from=$goal_list name=goal_list&>
                <tr class="top">
                <td class="w98" rowspan="2"><img src="<&$web_site&>/<&if !$goal.user.thumb_photo&>image/face.png<&else&><&$goal.user.thumb_photo&><&/if&>" /></td>
                <td colspan="7" class="list-text"><a href="<&$web_site&>/goal/detail/gid/<&$goal.id&>"><strong><&if $goal.gen_goal_id == 0&><&$goal.goal_name&><&else&><&$objConfigModel->getGenGoal($goal.gen_goal_id)&><&/if&></a></strong></tr>
                <tr class="list-body"><td class="list-text w150"><p>Posted on <&$goal.created_time|date_format&><br /><&$objConfigModel->getArea($goal.area_id)&></p></td>
                <td class="w50">$<&if $goal.budget&><&$goal.budget&><&else&>0<&/if&></td>
                <!--<td><&$goal.deadline|date_format:"%m/%d/%Y"&></td>-->
                <td><&$goal.created_time|date_format:"%m/%d/%Y"&></td>
                <td><&$goal.bid_cnt&></td>
                <td><&$goal.cheerleader_cnt&></td>
                <td><&$objConfigModel->getSearchGoalStatus($goal.status)&>
                </td>
                </tr>
                <tr class="line">
                <td class="list-name w98"><a href="<&$web_site&>/user/detail/uid/<&$goal.user.id&>" class="name"><&$objConfigModel->genUsername($goal.user.firstname, $goal.user.lastname)&></a></td>
                <td colspan="7"><label class="cheer"><a href="#pop4"class="show_pop4" id="<&$goal.id&>" goal_name="<&if $goal.gen_goal_id == 0&><&$goal.goal_name&><&else&><&$objConfigModel->getGenGoal($goal.gen_goal_id)&><&/if&>">Cheer me on</a></label><span><&if !$goal.cheerleader_cnt&>0<&else&><&$goal.cheerleader_cnt&><&/if&> cheerleaders</span>
                
                <a href="<&$web_site&>/goal/community/gid/<&$goal.id&>">Community</a></td>
                </tr>
                <&/foreach&>
                <!--end of goal list-->
                
            </table>
            <&if count($page_list) > 1&>
			<ul class="paging">
            	<li class="last-page"><a href="<&$pre_page&>"></a></li>

                <&foreach item=page from=$page_list name=page_list&>
                	<li <&if $page.selected&> class="now" <&/if&>><a href="<&$page.url&>" ><&$page.id&></a></li>                   
                <&/foreach&>
                <li class="next-page"><a href="<&$next_page&>"></a></li>
            </ul>
            <&/if&>           
        </div>
    </div>
<!--page_text_over-->
<&include file="include/not_see_your_city.tpl"&>
<&include file="include/cheer_pop.tpl"&>
<script>
var cur_url = "<&$cur_url&>";
</script>
<&include file="include/footer.tpl" page_js="search.js"&>